package cn.wolfcode.mapper;

import cn.wolfcode.domain.Permission;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Set;

@Repository
public interface PermissionMapper {

    int insert(Permission permission);

    int deleteByPrimaryKey(Long id);

    int updateByPrimaryKey(Permission permission);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    List<Permission> selectForList(QueryObject qo);

    void batchInsert(@Param("permissions") Set<Permission> permissions);

    List<Permission> selectByRoleId(Long roleId);

    void batchDelete(Long roleId);

    List<String> selectExpressionsByEmployeeId(Long employeeId);
}